package com.coolgame.login.bo;

import java.sql.Timestamp;

/**
 *  
 * @copyright : (C) Copyright cool game Corporation 2011-2020
 * @date:2013-6-24
 * @author:Caiyw
 * @since JDK1.6
 * @description:TODO
 */
public class AccountPack implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Long id;
	private Integer clusterId;
	private Long accountId;
	private Long leaderId;
	private Long packId;
	private Integer packNum;
	private Timestamp expiryDate;
	private Timestamp releaseDate;

	// Constructors

	/** default constructor */
	public AccountPack() {
	}

	/** minimal constructor */
	public AccountPack(Timestamp expiryDate, Timestamp releaseDate) {
		this.expiryDate = expiryDate;
		this.releaseDate = releaseDate;
	}

	/** full constructor */
	public AccountPack(Long id, Integer clusterId, Long accountId, Long leaderId, Long packId, Integer packNum,
			Timestamp expiryDate, Timestamp releaseDate) {
		this.id = id;
		this.clusterId = clusterId;
		this.accountId = accountId;
		this.leaderId = leaderId;
		this.packId = packId;
		this.packNum = packNum;
		this.expiryDate = expiryDate;
		this.releaseDate = releaseDate;
	}

	// Property accessors

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getClusterId() {
		return this.clusterId;
	}

	public void setClusterId(Integer clusterId) {
		this.clusterId = clusterId;
	}

	public Long getAccountId() {
		return this.accountId;
	}

	public void setAccountId(Long accountId) {
		this.accountId = accountId;
	}

	public Long getLeaderId() {
		return this.leaderId;
	}

	public void setLeaderId(Long leaderId) {
		this.leaderId = leaderId;
	}

	public Long getPackId() {
		return this.packId;
	}

	public void setPackId(Long packId) {
		this.packId = packId;
	}

	public Integer getPackNum() {
		return this.packNum;
	}

	public void setPackNum(Integer packNum) {
		this.packNum = packNum;
	}

	public Timestamp getExpiryDate() {
		return this.expiryDate;
	}

	public void setExpiryDate(Timestamp expiryDate) {
		this.expiryDate = expiryDate;
	}

	public Timestamp getReleaseDate() {
		return this.releaseDate;
	}

	public void setReleaseDate(Timestamp releaseDate) {
		this.releaseDate = releaseDate;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof AccountPack))
			return false;
		AccountPack castOther = (AccountPack) other;

		return ((this.getId() == castOther.getId()) || (this.getId() != null && castOther.getId() != null && this
				.getId().equals(castOther.getId())))
				&& ((this.getClusterId() == castOther.getClusterId()) || (this.getClusterId() != null
						&& castOther.getClusterId() != null && this.getClusterId().equals(castOther.getClusterId())))
				&& ((this.getAccountId() == castOther.getAccountId()) || (this.getAccountId() != null
						&& castOther.getAccountId() != null && this.getAccountId().equals(castOther.getAccountId())))
				&& ((this.getLeaderId() == castOther.getLeaderId()) || (this.getLeaderId() != null
						&& castOther.getLeaderId() != null && this.getLeaderId().equals(castOther.getLeaderId())))
				&& ((this.getPackId() == castOther.getPackId()) || (this.getPackId() != null
						&& castOther.getPackId() != null && this.getPackId().equals(castOther.getPackId())))
				&& ((this.getPackNum() == castOther.getPackNum()) || (this.getPackNum() != null
						&& castOther.getPackNum() != null && this.getPackNum().equals(castOther.getPackNum())))
				&& ((this.getExpiryDate() == castOther.getExpiryDate()) || (this.getExpiryDate() != null
						&& castOther.getExpiryDate() != null && this.getExpiryDate().equals(castOther.getExpiryDate())))
				&& ((this.getReleaseDate() == castOther.getReleaseDate()) || (this.getReleaseDate() != null
						&& castOther.getReleaseDate() != null && this.getReleaseDate().equals(
						castOther.getReleaseDate())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getId() == null ? 0 : this.getId().hashCode());
		result = 37 * result + (getClusterId() == null ? 0 : this.getClusterId().hashCode());
		result = 37 * result + (getAccountId() == null ? 0 : this.getAccountId().hashCode());
		result = 37 * result + (getLeaderId() == null ? 0 : this.getLeaderId().hashCode());
		result = 37 * result + (getPackId() == null ? 0 : this.getPackId().hashCode());
		result = 37 * result + (getPackNum() == null ? 0 : this.getPackNum().hashCode());
		result = 37 * result + (getExpiryDate() == null ? 0 : this.getExpiryDate().hashCode());
		result = 37 * result + (getReleaseDate() == null ? 0 : this.getReleaseDate().hashCode());
		return result;
	}

}